home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / ab20 / ab20_archive / utilities / printer / pf_deskjet.lzh / PF_DeskJet.ReadMe
Text File  |  1991-11-15  |  8KB  |  173 lines

  1. The program PF (short for PRINTFILES) is an utility written to print
  2. text files on an Hewlett-Packard DeskJet 500 printer connected to the
  3. parallel port of an Amiga personal computer, selecting in the same
  4. time the font and the printing style between the internal options of
  5. this printer.
  6.  
  7. PF comes in two versions, PF1 and PF2, written for the SAS C-Compiler
  8. v5.10: the printing routines are the same. But PF1 is callable only
  9. from the CLI, and is structured to be easily modified for different
  10. computers (e.g. IBM (argh!) PC's); I did not try, but as I avoided
  11. all the Intuition facilities and computer dependent statements, it
  12. should compile and work with the only change of the output port name
  13. (from PAR: to e.g. LPT1: or maybe PRN:). For maximum portability PF1
  14. writes to the printer fopening a file to PAR: and fwriting there; this
  15. can be not strictly kosher but works (on the Amiga). PF2 instead opens
  16. a device for output, and supports in addition CTRL-C handling and a
  17. Workbench interface, built using the Requester Library from Colin Fox
  18. and Bruce Dawson that can be found e.g. in the Fred Fish collection on
  19. disk 419, and that must be previuosly installed in order to run PF2
  20. (from the Workbench; you can still run PF2 from the CLI without having
  21. Req.Library installed).
  22.  
  23. The purpose of PF is to send the correct escape sequence that directs
  24. the printer to use an internal font, then to optionally print one or
  25. more files; the printer is reset to the default at the end, UNLESS
  26. when no file names are given: invoking PF this way you can manually
  27. initialise your DeskJet as you like. To initialise the printer from
  28. the Workbench interface, exit from the file requester without
  29. selections. Be careful: the first time that something is written on
  30. PRT:, Amiga sends the initialisation sequence looking at the existing
  31. preferences; to use an internal font not selectable from Preferences,
  32. you should first print something; then use PF; the copy to PRT: the
  33. wanted file(s).
  34.  
  35. In PF I have foreseen also a "special" printing mode: 2 pages (55
  36. lines and 80 columns each) on the same sheet of paper, in landscape
  37. mode with a small font and a nice border around. This printing mode
  38. is ssllloooowwwwww... so slow that you could see system requesters
  39. asking to check your printer, because a page cannot be printed before
  40. the printer timeout (just ignore these messages, and click RESUME; or
  41. use PF1 that, writing directly on the parallel device, does not have
  42. timeouts).
  43.  
  44. Usage from the CLI:
  45.  
  46. Command:     PF   [switches]   [file [file [file ... ] ] ]
  47.  
  48. Switches:    -l : Landscape (default is portrait);                  
  49.              -i : Italic (default is roman);                        
  50.             -bN : insert N Blanks at the beginning of every line;   
  51.             -aN : expand tAbs every N-th column (default: N=8);
  52.              -g : Letter-Gothic font (default is Courier);          
  53.              -t : Times font (default is Courier);                  
  54.              -s : Small pitch (Courier: 16.67 cpi; Let.Got.: 24cpi);
  55.              -x : eXtra-small pitch (20 cpi - for Courier only);    
  56.              -8 : 8 lpi (default is 6 lpi);                         
  57.              -6 : 6 points high fonts (default is 12 points fonts); 
  58.              -d : Draft quality (default is letter quality);        
  59.              -2 : special mode (2 pages every side).                
  60.  
  61. The switches can be specified one by one: e.g. -g -8 -s if you need
  62. Letter-Gothic font, spaced at 8 lines per inch and with 24 characters
  63. per inch horizontally; or together, e.g. -g8s for the same layout.
  64. Only the -bN and the -aN switches must be specified alone, or
  65. specified as the last ones in a group of switches (e.g. you can write
  66. -g8s -b10; OR -g8sb10; but NOT -b10g8s).
  67.  
  68. The switches can be either lower or uppercase; the default for tab
  69. expansion is every 8th column (i.e. at columns 9, 17, ...) and can be
  70. changed using the -aN option.
  71.  
  72. If the input stream contains a non-printable character, it will not be
  73. sent to the printer: for "non-printable", here I essentially mean the
  74. "control" characters, having ASCII codes from 00 to 037 (octal), plus
  75. DEL (0177 octal); the characters corresponding to codes above 0177 are
  76. strictly implementation-dependent (and usually printables), and what I
  77. needed was to avoid escape sequences embedded in the text to interfere
  78. with the printer setting.
  79.  
  80. The -s, -x, -l and -i switches are ignored when the request is not
  81. compatible with the selected font; the "normal" pitch is 10 cpi for
  82. Courier, and 12 cpi for Letter-Gothic (Times is a proportional font).
  83. All the switches different from -d and -aN will be ignored if the
  84. option -2 is selected.
  85.  
  86. The program (PF2 only) can be interrupted with a CTRL-C; however, to
  87. flush the DeskJet internal buffer, you should switch it off then on
  88. again.  Please - take care to switch on your printer before invoking
  89. PF; I check the parallel device properly, but if the printer is
  90. connected to the serial port I cannot detect its status.
  91.              
  92. Giving PF with invalid switches (or PF without any argument) a short
  93. help screen will be printed on stdout.
  94.  
  95. This program can be freely distributed and modified, provided that no
  96. money is charged for it; and that the original header is left at the
  97. beginning with my name and address. If someone will improve PF, I
  98. would like to hear about his/her modifications: please, send me your
  99. changes!
  100.  
  101. In this same directory you will find a "quick & dirty" program named
  102. MAX: invoking MAX <FileName> from the CLI will print on stdout some
  103. information about <FileName>: number of lines, length of the longest
  104. line, non-printable characters in the file (if any); that could help
  105. you in choosing the right parameters for PF.
  106.  
  107. Author:  Maurizio Loreti, aka MLO or I3NOO.            
  108. Address: University of Padova - Department of Physics   
  109.          Via F. Marzolo, 8 - 35131 PADOVA - Italy      
  110. Phone:   (39)(49) 844-313         FAX: (39)(49) 844-245
  111. E-Mail:  LORETI at IPDINFN (BITNET),  or VAXFPD::LORETI
  112.          (DECnet). VAXFPD is DECnet node 38.257 or 39169;
  113.          INTERNET: LORETI@PADOVA.INFN.IT . All these
  114.          addresses refer to the same computer, a VAX
  115.          8600 owned from the Italian Agency for Research
  116.          in High Energy Physics (I.N.F.N.).
  117. Home: Via G. Donizetti 6 - 35010 CADONEGHE (PD) - Italy
  118.  
  119.  
  120. Home setup: Amiga 500, A501, A590 20MB Hard Disk, 3 MB total memory;
  121.             of course an Hewlett-Packard Deskjet 500.
  122. Work setup: Amiga 3000 16 MHz, 50 MB Hard Disk, 6 MB total memory;
  123.             and another Hewlett-Packard Deskjet 500.
  124. Software: CygnusEd Professional, SAS-C 5.10, FlexeLint for the Amiga.
  125.  
  126.  
  127.                                             Have Fun!
  128.  
  129.                                                          MLO
  130.  
  131. ===========================================================================
  132.  
  133. Changes since PF1 1.15 (Fred Fish disk 539):
  134. -------------------------------------------
  135.  
  136. 1.16: Added a version tag string, so you can give the command VERSION PF1.
  137.  
  138.       Removed SAS built-in Control-C handling routines.
  139.  
  140.  
  141. Changes since PF2 2.10 (Fred Fish disk 539):
  142. -------------------------------------------
  143.  
  144. 2.11: Corrected a nasty bug in Ask(); 'current' was changed then used, also
  145.       if out of bounds, to erase last string.
  146.  
  147.       Added a version tag string, so you can give the command VERSION PF2.
  148.  
  149.       Another bug corrected: when the special mode was selected from the
  150.       Workbench, SetSpecialMode() was called twice.
  151.  
  152.       Added all AmigaDOS prototypes (#include <proto/whatever.h>), also if
  153.       this implies more casting.
  154.  
  155.       Now, when called from the Workbench, the program opens its own window
  156.       for I/O; ErrMes() has been deleted, and replaced from printf().
  157.  
  158.       Removed SAS built-in Control-C handling routines.
  159.  
  160. 2.12: I bought FlexeLint for the Amiga, from Gimpel software; no errors
  161.       have been detected from Lint, but some stylistical cleanup has been
  162.       done. Yow... on PF1 Lint has detected no style oddities at all :^) !
  163.       I recommend you FlexeLint: every serious C programmer needs it. By
  164.       the way, I am not connected to Gimpel Software; I am only a satisfied
  165.       customer.
  166.  
  167.  
  168. ------
  169.  
  170.       Thanks to all people who sent bug reports!
  171.  
  172.                                                         MLO
  173.